import React, { Component } from 'React'
const list = ['vue', 'react', 'javascript', 'html', 'css', 'node']
let state = {
    num: 2000
}
let num = 1000;
let flag = false;
const numAdd = () => {
    // state.num++;
    // console.log(state.num);
    num++;
    console.log(num);

}
export const Allcpt = () => (
    <div>
        啊哈
        {list.map((l, i) => (
            <p key={i} onClick={() => { console.log(i, flag); flag = !flag; numAdd() }}>{l}</p>
        ))}
        {/* <p>{state.num}</p> */}
        {flag && <p>{num}</p>}
    </div>
)